package entityJDBC;

public class PositionDescription {
	private int idpositiondescription;
	private int idDepartment;
	private String requirements;
	private String responsabilities;
	//name of the project
	private String project;
	
	//constructor for the positiondescription
	public PositionDescription(int idpositiondescription, int idDepartment,
			String requirements, String responsabilities, String project) {
		super();
		this.idpositiondescription = idpositiondescription;
		this.idDepartment = idDepartment;
		this.requirements = requirements;
		this.responsabilities = responsabilities;
		this.project = project;
	}
	//getters and setters for every field
	public int getIdpositiondescription() {
		return idpositiondescription;
	}
	public void setIdpositiondescription(int idpositiondescription) {
		this.idpositiondescription = idpositiondescription;
	}
	public int getIdDepartment() {
		return idDepartment;
	}
	public void setIdDepartment(int idDepartment) {
		this.idDepartment = idDepartment;
	}
	public String getRequirements() {
		return requirements;
	}
	public void setRequirements(String requirements) {
		this.requirements = requirements;
	}
	public String getResponsabilities() {
		return responsabilities;
	}
	public void setResponsabilities(String responsabilities) {
		this.responsabilities = responsabilities;
	}
	public String getProject() {
		return project;
	}
	public void setProject(String project) {
		this.project = project;
	}
	
	@Override
	public String toString() {
		return "PositionDescription [idpositiondescription="
				+ idpositiondescription + ", idDepartment=" + idDepartment
				+ ", requirements=" + requirements + ", responsabilities="
				+ responsabilities + ", project=" + project + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + idDepartment;
		result = prime * result + idpositiondescription;
		result = prime * result + ((project == null) ? 0 : project.hashCode());
		result = prime * result
				+ ((requirements == null) ? 0 : requirements.hashCode());
		result = prime
				* result
				+ ((responsabilities == null) ? 0 : responsabilities.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PositionDescription other = (PositionDescription) obj;
		if (idDepartment != other.idDepartment)
			return false;
		if (idpositiondescription != other.idpositiondescription)
			return false;
		if (project == null) {
			if (other.project != null)
				return false;
		} else if (!project.equals(other.project))
			return false;
		if (requirements == null) {
			if (other.requirements != null)
				return false;
		} else if (!requirements.equals(other.requirements))
			return false;
		if (responsabilities == null) {
			if (other.responsabilities != null)
				return false;
		} else if (!responsabilities.equals(other.responsabilities))
			return false;
		return true;
	}
	
}
